<?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');
/**
 * View file: category
 *
 * @author luubk
 * @since 12-06-2012 - 01:15:30
 */
?>
<?php if(isset($noti)): ?>
<h4 class="alert_success"><?php echo $noti ?></h4>
<?php endif; ?>
<article class="module width_3_quarter">
    <header>
        <h3><?php echo $title ?></h3>
    </header>
    <table class="tablesorter" cellspacing="0"> 
        <thead> 
            <tr>
                <th>ID</th> 
                <th>Tên danh mục</th>                 
                <th>Thứ tự</th>                                
                <th>Trạng thái</th> 
                <th>Xử lý</th> 
            </tr> 
        </thead> 
        <tbody> 
            <?php if ($items): ?>                
                <?php $cates = $items ?>                
                <?php foreach ($items as $item): ?>
                    <tr>                             
                        <td><?php echo $item['cate_id'] ?></td> 
                        <td><?php echo $item['cate_name'] ?></td>                                                
                        <td><?php echo $item['cate_rank'] ?></td>                        
                        <td><?php echo status_text($item['cate_status']) ?></td> 
                        <td>
                            <?php echo edit_text('apps/category_form/' . $item['cate_id']) ?>
                            <?php echo delete_text('apps/category_delete/' . $item['cate_id']) ?>
                        </td> 
                    </tr>        
                <?php endforeach; ?>
            <?php else: ?>
                <tr>
                    <td colspan="5">Không có dữ liệu</td>
                </tr>
            <?php endif; ?>
        </tbody> 
    </table>
    <footer>
        <p><?php echo $paging ?></p>
    </footer>
</article><!-- end of content manager article -->

<article class="module width_quarter">
    <header><h3>Cây danh mục</h3></header>
    <?php if (isset($cate_tree)): ?>                    
        <div>            
            <?php echo $cate_tree ?>                           
        </div>                    
    <?php endif; ?>
</article>